/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PageSetupUI.java
 *
 * Created on Oct 8, 2010, 10:36:48 AM
 */
package project.jpdftools.pagesetup.ui;

import java.awt.Toolkit;
import java.util.logging.Level;
import javax.swing.JDialog;
import project.jpdfexport.constants.JPDFConst.ORIENTATION;
import project.jpdfexport.constants.JPDFConst.PAPER_SIZE;
import project.jpdftools.managers.LocalizationManager;
import project.jpdftools.managers.LoggerManager;
import project.jpdftools.pagesetup.PageSetup;

/**
 *
 * @author Mido
 */
public class PageSetupUI extends JDialog {

    private static boolean is_component_visible = false;

    /**
     * Creates new form PageSetupUI
     */
    public PageSetupUI() {
        initComponents();

        // center the component
        project.jpdftools.toolkit.Toolkit.centerWindow(this, this.getHeight(), this.getWidth());
        this.setAlwaysOnTop(true);

        // load previously saved values
        loadParameters();
        // indicate that the frame is visible
        is_component_visible = true;
        LoggerManager.getLogger().log(Level.INFO, "Frame shown \"{0}\".", "PageSetupUI");
        // intilaize button group components
        bg_margin_selector.add(rb_use_default_margins);
        bg_margin_selector.add(rb_use_the_following_margins);
        bg_orientation_selector.add(rb_export_pdf_page_setup_orientation_landscape);
        bg_orientation_selector.add(rb_export_pdf_page_setup_orientation_portrait);
    }

    /**
     * Load previously saved parameters
     */
    private void loadParameters() {
        // load paper size
        cb_export_pdf_page_setup_paper_size.setSelectedIndex(PageSetup.getPaper_size());
        // load orientation
        if (PageSetup.getOrientation() == ORIENTATION.Portrait) {
            rb_export_pdf_page_setup_orientation_portrait.setSelected(true);
        } else {
            rb_export_pdf_page_setup_orientation_landscape.setSelected(true);
        }
        if (PageSetup.isUse_default_margins() == false) {
            rb_use_the_following_margins.setSelected(true);
            // load margins
            yc_export_pdf_page_setup_margins_top.setYear((int) PageSetup.getTop_margin());
            yc_export_pdf_page_setup_margins_bottom.setYear((int) PageSetup.getBottom_margin());
            yc_export_pdf_page_setup_margins_left.setYear((int) PageSetup.getLeft_margin() + 100);
            yc_export_pdf_page_setup_margins_right.setYear((int) PageSetup.getRight_margin() + 100);
        } else {
            rb_use_default_margins.setSelected(true);
            // disable margins
            enableMargins(false);
        }
    }

    public static boolean IsComponentVisible() {
        return is_component_visible;
    }

    /**
     * enable/Disable the margins
     *
     * @param b
     */
    private void enableMargins(boolean b) {
        yc_export_pdf_page_setup_margins_top.setEnabled(b);
        yc_export_pdf_page_setup_margins_bottom.setEnabled(b);
        yc_export_pdf_page_setup_margins_left.setEnabled(b);
        yc_export_pdf_page_setup_margins_right.setEnabled(b);

        l_export_pdf_page_setup_margins_bottom.setEnabled(b);
        l_export_pdf_page_setup_margins_left.setEnabled(b);
        l_export_pdf_page_setup_margins_right.setEnabled(b);
        l_export_pdf_page_setup_margins_top.setEnabled(b);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        bg_margin_selector = new javax.swing.ButtonGroup();
        bg_orientation_selector = new javax.swing.ButtonGroup();
        p_orientation = new javax.swing.JPanel();
        rb_export_pdf_page_setup_orientation_portrait = new javax.swing.JRadioButton();
        rb_export_pdf_page_setup_orientation_landscape = new javax.swing.JRadioButton();
        p_export_pdf_page_setup_margins = new javax.swing.JPanel();
        l_export_pdf_page_setup_margins_bottom = new javax.swing.JLabel();
        yc_export_pdf_page_setup_margins_left = new com.toedter.calendar.JYearChooser();
        yc_export_pdf_page_setup_margins_right = new com.toedter.calendar.JYearChooser();
        l_export_pdf_page_setup_margins_top = new javax.swing.JLabel();
        yc_export_pdf_page_setup_margins_top = new com.toedter.calendar.JYearChooser();
        l_export_pdf_page_setup_margins_right = new javax.swing.JLabel();
        l_export_pdf_page_setup_margins_left = new javax.swing.JLabel();
        yc_export_pdf_page_setup_margins_bottom = new com.toedter.calendar.JYearChooser();
        rb_use_default_margins = new javax.swing.JRadioButton();
        rb_use_the_following_margins = new javax.swing.JRadioButton();
        cb_export_pdf_page_setup_paper_size = new javax.swing.JComboBox();
        l_export_pdf_page_setup_paper_size = new javax.swing.JLabel();
        bt_ok = new javax.swing.JButton();
        bt_cancel = new javax.swing.JButton();
        bt_default_values = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_TITLE"));
        setIconImage(Toolkit.getDefaultToolkit().getImage("Data/Icons/Soft Scraps Icons/10.png"));
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                PageSetupUI.this.windowClosing(evt);
            }
        });

        p_orientation.setBorder(javax.swing.BorderFactory.createTitledBorder(null, LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_ORIENTATION_LABEL"), javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Times New Roman", 1, 12), new java.awt.Color(0, 0, 255))); // NOI18N

        rb_export_pdf_page_setup_orientation_portrait.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_PORTRAIT"));

        rb_export_pdf_page_setup_orientation_landscape.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_LANDSCAPE"));

        javax.swing.GroupLayout p_orientationLayout = new javax.swing.GroupLayout(p_orientation);
        p_orientation.setLayout(p_orientationLayout);
        p_orientationLayout.setHorizontalGroup(
            p_orientationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(p_orientationLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(rb_export_pdf_page_setup_orientation_portrait)
                .addGap(129, 129, 129)
                .addComponent(rb_export_pdf_page_setup_orientation_landscape)
                .addContainerGap(129, Short.MAX_VALUE))
        );
        p_orientationLayout.setVerticalGroup(
            p_orientationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(p_orientationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(rb_export_pdf_page_setup_orientation_landscape)
                .addComponent(rb_export_pdf_page_setup_orientation_portrait))
        );

        p_export_pdf_page_setup_margins.setBorder(javax.swing.BorderFactory.createTitledBorder(null, LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_MARGIN_LABEL"), javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Times New Roman", 1, 12), new java.awt.Color(0, 0, 255))); // NOI18N

        l_export_pdf_page_setup_margins_bottom.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_BOTTOM_MARGIN"));

        yc_export_pdf_page_setup_margins_left.setEndYear(100);
        yc_export_pdf_page_setup_margins_left.setMinimum(5);
        yc_export_pdf_page_setup_margins_left.setValue(5);

        yc_export_pdf_page_setup_margins_right.setEndYear(100);
        yc_export_pdf_page_setup_margins_right.setMinimum(5);
        yc_export_pdf_page_setup_margins_right.setValue(5);

        l_export_pdf_page_setup_margins_top.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_TOP_MARGIN"));

        yc_export_pdf_page_setup_margins_top.setEndYear(100);
        yc_export_pdf_page_setup_margins_top.setMinimum(25);
        yc_export_pdf_page_setup_margins_top.setValue(25);

        l_export_pdf_page_setup_margins_right.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_RIGHT_MARGIN"));

        l_export_pdf_page_setup_margins_left.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_LEFT_MARGIN"));

        yc_export_pdf_page_setup_margins_bottom.setEndYear(100);
        yc_export_pdf_page_setup_margins_bottom.setMinimum(15);
        yc_export_pdf_page_setup_margins_bottom.setValue(15);

        rb_use_default_margins.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_USE_DEFAULT_MARGINS"));
        rb_use_default_margins.setFocusPainted(false);
        rb_use_default_margins.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rb_use_default_marginsActionPerformed(evt);
            }
        });

        rb_use_the_following_margins.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_USE_THE_FOLLOWING_MARGINS"));
        rb_use_the_following_margins.setFocusPainted(false);
        rb_use_the_following_margins.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rb_use_the_following_marginsActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout p_export_pdf_page_setup_marginsLayout = new javax.swing.GroupLayout(p_export_pdf_page_setup_margins);
        p_export_pdf_page_setup_margins.setLayout(p_export_pdf_page_setup_marginsLayout);
        p_export_pdf_page_setup_marginsLayout.setHorizontalGroup(
            p_export_pdf_page_setup_marginsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(p_export_pdf_page_setup_marginsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(p_export_pdf_page_setup_marginsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rb_use_the_following_margins)
                    .addComponent(rb_use_default_margins)
                    .addGroup(p_export_pdf_page_setup_marginsLayout.createSequentialGroup()
                        .addGroup(p_export_pdf_page_setup_marginsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(l_export_pdf_page_setup_margins_top)
                            .addComponent(l_export_pdf_page_setup_margins_right))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(p_export_pdf_page_setup_marginsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(yc_export_pdf_page_setup_margins_top, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(yc_export_pdf_page_setup_margins_right, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(p_export_pdf_page_setup_marginsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(l_export_pdf_page_setup_margins_bottom)
                    .addComponent(l_export_pdf_page_setup_margins_left))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(p_export_pdf_page_setup_marginsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(yc_export_pdf_page_setup_margins_left, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(yc_export_pdf_page_setup_margins_bottom, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        p_export_pdf_page_setup_marginsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {yc_export_pdf_page_setup_margins_bottom, yc_export_pdf_page_setup_margins_left, yc_export_pdf_page_setup_margins_right, yc_export_pdf_page_setup_margins_top});

        p_export_pdf_page_setup_marginsLayout.setVerticalGroup(
            p_export_pdf_page_setup_marginsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(p_export_pdf_page_setup_marginsLayout.createSequentialGroup()
                .addComponent(rb_use_default_margins)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rb_use_the_following_margins)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(p_export_pdf_page_setup_marginsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(yc_export_pdf_page_setup_margins_top, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(l_export_pdf_page_setup_margins_bottom, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(l_export_pdf_page_setup_margins_top, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(yc_export_pdf_page_setup_margins_bottom, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(p_export_pdf_page_setup_marginsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(yc_export_pdf_page_setup_margins_left, 0, 0, Short.MAX_VALUE)
                    .addComponent(yc_export_pdf_page_setup_margins_right, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(l_export_pdf_page_setup_margins_right)
                    .addComponent(l_export_pdf_page_setup_margins_left))
                .addContainerGap())
        );

        p_export_pdf_page_setup_marginsLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {l_export_pdf_page_setup_margins_bottom, l_export_pdf_page_setup_margins_left, l_export_pdf_page_setup_margins_right, l_export_pdf_page_setup_margins_top, yc_export_pdf_page_setup_margins_bottom, yc_export_pdf_page_setup_margins_left, yc_export_pdf_page_setup_margins_right, yc_export_pdf_page_setup_margins_top});

        cb_export_pdf_page_setup_paper_size.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "A3", "A4", "A5", "A6", "Exective", "Legal", "Letter" }));
        cb_export_pdf_page_setup_paper_size.setSelectedIndex(1);

        l_export_pdf_page_setup_paper_size.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_PAPER_SIZE_LABEL"));

        bt_ok.setText(LocalizationManager.getCurrent_resource().getString("OK"));
        bt_ok.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_okActionPerformed(evt);
            }
        });

        bt_cancel.setText(LocalizationManager.getCurrent_resource().getString("CANCEL"));
        bt_cancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_cancelActionPerformed(evt);
            }
        });

        bt_default_values.setText(LocalizationManager.getCurrent_resource().getString("PAGE_SETUP_PANEL_DEFAULT_VAUES"));
        bt_default_values.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_default_valuesActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(l_export_pdf_page_setup_paper_size)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cb_export_pdf_page_setup_paper_size, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(p_export_pdf_page_setup_margins, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(p_orientation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(bt_cancel)
                        .addGap(6, 6, 6)
                        .addComponent(bt_default_values)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(bt_ok)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {p_export_pdf_page_setup_margins, p_orientation});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(l_export_pdf_page_setup_paper_size)
                    .addComponent(cb_export_pdf_page_setup_paper_size, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(p_export_pdf_page_setup_margins, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(p_orientation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(bt_ok)
                    .addComponent(bt_cancel)
                    .addComponent(bt_default_values))
                .addContainerGap(13, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void bt_cancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_cancelActionPerformed
        // close the frame
        this.dispose();
        // indicate that the frame is hidden
        is_component_visible = false;
        LoggerManager.getLogger().log(Level.INFO, "Frame hidden \"{0}\".", "PageSetupUI");
    }//GEN-LAST:event_bt_cancelActionPerformed

    private void bt_okActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_okActionPerformed
        // set selected values in PageSetup class
        PageSetup.setPaper_size(cb_export_pdf_page_setup_paper_size.getSelectedIndex());

        if (rb_use_the_following_margins.isSelected() == true) {
            PageSetup.setUse_default_margins(false);
            PageSetup.setTop_margin(yc_export_pdf_page_setup_margins_top.getYear());
            PageSetup.setBottom_margin(yc_export_pdf_page_setup_margins_bottom.getYear());
            PageSetup.setRight_margin(yc_export_pdf_page_setup_margins_right.getYear() - 100);
            PageSetup.setLeft_margin(yc_export_pdf_page_setup_margins_left.getYear() - 100);
        } else {
            PageSetup.setUse_default_margins(true);
        }

        // get orientation
        if (rb_export_pdf_page_setup_orientation_landscape.isSelected() == true) {
            PageSetup.setOrientation(ORIENTATION.Landscape);
        } else if (rb_export_pdf_page_setup_orientation_portrait.isSelected() == true) {
            PageSetup.setOrientation(ORIENTATION.Portrait);
        }
        // close the frame
        this.dispose();
        // indicate that the frame is hidden
        is_component_visible = false;
        LoggerManager.getLogger().log(Level.INFO, "Page Setup settings changed.");
    }//GEN-LAST:event_bt_okActionPerformed

    private void windowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_windowClosing
        bt_cancelActionPerformed(null);
}//GEN-LAST:event_windowClosing

    private void bt_default_valuesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_default_valuesActionPerformed
        // restore default values
        PageSetup.setPaper_size(PAPER_SIZE.A4);
        PageSetup.setOrientation(ORIENTATION.Portrait);
        PageSetup.setTop_margin(25.0f);
        PageSetup.setBottom_margin(15.0f);
        PageSetup.setLeft_margin(-95.0f);
        PageSetup.setRight_margin(-95.0f);
        PageSetup.setUse_default_margins(true);

        // apply default values on UI
        loadParameters();
        LoggerManager.getLogger().log(Level.INFO, "Page Setup default settings applied.");
    }//GEN-LAST:event_bt_default_valuesActionPerformed

    private void rb_use_default_marginsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rb_use_default_marginsActionPerformed
        enableMargins(false);
    }//GEN-LAST:event_rb_use_default_marginsActionPerformed

    private void rb_use_the_following_marginsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rb_use_the_following_marginsActionPerformed
        enableMargins(true);
    }//GEN-LAST:event_rb_use_the_following_marginsActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup bg_margin_selector;
    private javax.swing.ButtonGroup bg_orientation_selector;
    private javax.swing.JButton bt_cancel;
    private javax.swing.JButton bt_default_values;
    private javax.swing.JButton bt_ok;
    private javax.swing.JComboBox cb_export_pdf_page_setup_paper_size;
    private javax.swing.JLabel l_export_pdf_page_setup_margins_bottom;
    private javax.swing.JLabel l_export_pdf_page_setup_margins_left;
    private javax.swing.JLabel l_export_pdf_page_setup_margins_right;
    private javax.swing.JLabel l_export_pdf_page_setup_margins_top;
    private javax.swing.JLabel l_export_pdf_page_setup_paper_size;
    private javax.swing.JPanel p_export_pdf_page_setup_margins;
    private javax.swing.JPanel p_orientation;
    private javax.swing.JRadioButton rb_export_pdf_page_setup_orientation_landscape;
    private javax.swing.JRadioButton rb_export_pdf_page_setup_orientation_portrait;
    private javax.swing.JRadioButton rb_use_default_margins;
    private javax.swing.JRadioButton rb_use_the_following_margins;
    private com.toedter.calendar.JYearChooser yc_export_pdf_page_setup_margins_bottom;
    private com.toedter.calendar.JYearChooser yc_export_pdf_page_setup_margins_left;
    private com.toedter.calendar.JYearChooser yc_export_pdf_page_setup_margins_right;
    private com.toedter.calendar.JYearChooser yc_export_pdf_page_setup_margins_top;
    // End of variables declaration//GEN-END:variables
}
